<?php
/**
 * Created by PhpStorm.
 * User: cwfan
 * Date: 2019/1/15
 * Time: 14:49
 */

namespace App\Library\Model;


use Illuminate\Database\Eloquent\Model as EloquentModel;

abstract class Model extends EloquentModel
{
    use WithValidates, WithRequestFilter;

    protected $perPage = 10;

    /**
     * @param array $filter
     * @throws InvalidParameterException
     */
    public function filterResults(array $filter)
    {
        $this->setFilter($this->newModelQuery(), $filter);
    }

}
